window.addEventListener('load', function() {
    var interval;

    function frame0(obj, speed, end) {
        clearInterval(interval);
        interval = setInterval(() => {
            if (obj.offsetWidth >= end) {
                clearInterval(interval);
            } else {
                obj.style.width = obj.offsetWidth + speed + 'px';
            };
        }, 30);
    };

    function frame1(obj, speed, end) {
        clearInterval(interval);
        interval = setInterval(() => {
            if (getComputedStyle(obj).fontSize >= end + 'px') {
                clearInterval(interval);
            } else {
                obj.style.fontSize = parseInt(getComputedStyle(obj).fontSize) + speed + 'px';
            };
        }, 30);
    };
});